package com.yq.day18._06string;

import javax.lang.model.element.NestingKind;

/**
 * @author 3307235355@qq.com
 * @since 2022/06/19 10:39
 */
public class Demo03 {

    public static void main(String[] args) {
    //    邮箱中必须带有@，并且@符号不能在开头和结尾
        String email = "123@qq.com@";
        if (email.contains("@")) {
            String start = email.substring(0,1);
            String end = email.substring(email.length()-1);
            if (start.equals("@") || end.equals("@")){
                System.out.println("格式错误");
            }else{
                System.out.println("dui");
            }
        }

    }
}
